package com.grape.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.grape.pojo.Bookmark;
import com.grape.service.BookmarkService;

@Controller
@Namespace("/")
@Scope("prototype")
@ParentPackage("json-default")
public class BookmarkAction extends BaseAction<Bookmark>{
	private static final long serialVersionUID = 1L;
	
	@Autowired
	private BookmarkService bs;
	
	@Action(value="edit_bookmark")
	public void editBookmark() {
		
		bs.editBookmark(model);
		
	}
	
	
	@Action(value="del_bookmark")
	public void delBookmark() {
		
		bs.delBookmark(model.getId());
		
	}

}
